Repository navigation
Add syntax highlighting for the Actions lockfile (actions.lock) - #643
Open
nodeselector wants to merge 3 commits into
Open
nodeselector wants to merge 3 commits into
nodeselector wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The grammar truncates valid quoted Git refs containing # or ,, leaving the remainder without its intended highlighting.
1 open issue
What changed in this PR
Adds syntax highlighting for .github/workflows/actions.lock using the extension’s existing workflow YAML grammar, without new activation events or runtime code.
Changes:
- Registers a dedicated GitHub Actions Lockfile language.
- Adds highlighting scopes for action pins, refs, and commit digests.
- Documents lockfile highlighting in the README; schema validation remains out of scope.
| File | Description |
|---|---|
| README.md | Documents Actions lockfile highlighting. |
| package.json | Registers the lockfile language and grammars. |
| language/syntaxes/lockfile.tmLanguage.json | Reuses the workflow YAML grammar for lockfiles. |
| language/syntaxes/lockfile.tmGrammar.json | Adds pin and digest scopes while excluding comments. |
Review effort: Balanced (adaptive)
Registers a GitHub Actions Lockfile language for .github/workflows/actions.lock that reuses the bundled YAML grammar and injects scopes for action pins (owner/repo@ref) and commit digests.
Git refs may contain # and ,. Quoted pins now color the whole ref. Plain pins keep # (YAML only starts a comment after whitespace) but still stop at , so flow sequences split correctly.
nodeselector
changed the base branch from
main
to
nodeselector-ci-skip-playwright-browser
November 25, 2026 22:39
nodeselector
force-pushed
the
nodeselector-vscode-actions-lock-pr
branch
from
November 25, 2026 22:39
49fa5c8 to
eb3ce99
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

.github/workflows/actions.lock, the dependency lockfile written bygh actions-lock. Today the file opens as Plain Text.owner/repo@ref, including refs with/or#, and,in quoted pins) and commit digests (sha1-…,sha256-…), so they stand out from the rest of the YAML. Comments are left alone.languagesandgrammarscontributions and two grammar files. No new activation events or extension code.gh actions-lock --verifyremains the validator.Testing: built, linted and ran the unit tests, including a new grammar test for refs containing
#and,. I installed the packaged extension in VS Code 1.143 and opened the lockfile fromgithub/gh-actions-lock(format v0.0.3): it now opens as GitHub Actions Lockfile with pins, refs and digests highlighted, and workflow files are unchanged. I also tokenized edge cases (ahostnamefield,release/v1refs,sha256digests, and pins inside comments) and all scoped correctly.